range

open fun range(value: Byte, min: Byte, max: Byte)
open fun range(value: Double, min: Double, max: Double)
open fun range(value: Float, min: Float, max: Float)
open fun range(value: Int, min: Int, max: Int)
open fun range(value: Long, min: Long, max: Long)
open fun range(value: Short, min: Short, max: Short)

test if a numeric value is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

Throws

when value is outside min … max


open fun range(value: Byte, min: Byte, max: Byte, name: String)
open fun range(value: Double, min: Double, max: Double, name: String)
open fun range(value: Float, min: Float, max: Float, name: String)
open fun range(value: Int, min: Int, max: Int, name: String)
open fun range(value: Long, min: Long, max: Long, name: String)
open fun range(value: Short, min: Short, max: Short, name: String)

test if a numeric value is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

name

value name for better error message

Throws

when value is outside min … max


open fun range(value: CharSequence, min: Int, max: Int)
open fun range(value: Array<Any>, min: Int, max: Int)

test if a string length is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

Throws

when value is outside min … max


open fun range(value: CharSequence, min: Int, max: Int, name: String)
open fun range(value: Array<Any>, min: Int, max: Int, name: String)

test if a string length is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

name

value name for better error message

Throws

when value is outside min … max